module(...,package.seeall)
require"pins"
require"common"
-- BL = pins.setup(4,0)
-- BL(0)
-- isSleep = true
-- function sleep()
--     if isSleep then return end
--     pm.sleep("lcd_up")
--     isSleep = true
--     disp.sleep(1)
--     BL(0)
-- end
-- function wake(f)
--     if not isSleep then return end
--     pm.wake("lcd_up")
--     isSleep = nil
--     disp.sleep(0)
--     if not f then
--         page.update()
--     end
--     BL(1)
--     io.unmount(io.SDCARD)
--     io.mount(io.SDCARD)
-- end


sys.taskInit(function()
    sys.waitUntil("LCD_INIT")
    sys.wait(200)
    -- wake(1)
    disp.clear()
    disp.putimage("/lua/3color.png",0,0)
    disp.update()
    sys.wait(5000)
    -- sleep()
    disp.clear()
    disp.putimage("/lua/head240.jpg",0,0)
    disp.update()
    sys.wait(8000)
    log.info("LCD","LCD IS finished!")
    sys.wait(1)
    disp.clear()
    sys.publish("START_DONE")
end)

